#ifndef PNGTEXTURE_H
#define PNGTEXTURE_H

#define PNG_STATIC
#include "../Extern/Header/png.h"
#include <stdio.h>
#include <string>

using namespace std;

class PngTexture {
	public:
		png_bytep *pic;


		PngTexture();
		~PngTexture();

	    int load(string name);
        int clear();
	    int write(string out);
	    unsigned int getWidth();
	    unsigned int getHeight();
      unsigned int getChannels() { return nChannels; }
      unsigned int getBPP() { return nBPP; }
      bool CopyToBuffer(unsigned char *pbBuffer);

	private:
		png_structp png_ptr;
		png_infop	info_ptr;
		png_infop	end_info;
		char filename[255];
		unsigned int height, width, nChannels, nBPP;	
};

#endif

